package com.ipay.exception;

public class BaseException extends RuntimeException {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private String errorCode;
	private String errorMessage;
	
	public BaseException() {
		super();
	}
	
	public BaseException(String code) {
		super("系统错误，错误代码：" + code);
		this.errorCode = code;
	}
	
	public BaseException(String code, String message) {
		super("系统错误，[" + code + "]：" + message);
		this.errorCode = code;
		this.errorMessage = message;
	}
	
	public BaseException(String code, Exception e) {
		super("系统错误，错误代码：" + code, e);
		this.errorCode = code;
		this.errorMessage = e.getMessage();
	}

	public String getErrorCode() {
		return errorCode;
	}

	public void setErrorCode(String errorCode) {
		this.errorCode = errorCode;
	}

	public String getErrorMessage() {
		return errorMessage;
	}

	public void setErrorMessage(String errorMessage) {
		this.errorMessage = errorMessage;
	}
}
